package com.kingsoft.dc.khaos.module.spark.constants

/**
 *
 * create by goosoog 2019/3/28.
 *
 */
object MetaDataConstants {

  /**
   * 元数据接口path
   */
  final val QUERY_PHYSICALINFO_PATH = "ds/source/physicalInfo"
  final val QUERY_TABLE_LIST_FULL_PATH = "query/table/list/full"
  final val QUERY_TABLE_COLUMN_LIST_FULL_PATH = "query/tableColumn/list/full"
  final val QUERY_DB_LIST_FULL_PATH = "query/db/list/full"
  final val DMGRGQUERY_DATAMANAGER_RIGT = "datamanager/right/authority/project/quick"

  final val METADATA_MG_SERVICE_META_MG = "metadata-mg-service_meta-mg"
  final val METADATA_QUERY_SERVICE_META_QUERY = "metadata-query-service_meta-query" //元数据查询服务
  final val RIGHT_MG_SERVICE_RIGHT_MG = "right-mg-service_right-mg"
  final val RIGHT_QUERY_SERVICE_RIGHT_QUERY = "right-query-service_right-query" //权限查询服务
  final val AUTH_SERVER_URL = "auth-server.url" //权限查询服务


  /**
   * 元数据相关常量
   */
  final val URL = "url"
  final val ENV = "env"
  final val DSID = "dsId"
  final val DSNAME = "dsName"
  final val DBNAME = "dbName"
  final val TBLNAME = "tblName"
  final val TBLTYPE = "tblType"
  final val TBLCODE = "tblCode"
  final val PROJECTID = "projectId"
  final val PROJECTPARAM = "projectParam"
  final val PRIVILEGE = "privilege"
  final val PAGEPARAM = "pageParam"
  final val PAGE = "page"
  final val PAGESIZE = "pageSize"
  final val USERID = "userId"
  final val DBTYPE = "dbType"
  final val FILTER = "filter"
  final val METADATAPRIVSLIST = "metadataPrivsList"
  final val DATASOURCEID = "dataSourceId"
  final val DATATYPE = "dataType"
  final val TEST_BUCKET_NAME = "TEST_BUCKET_NAME"
  final val ONLINE_BUCKET_NAME = "ONLINE_BUCKET_NAME"
  final val ENV_TEST = "TEST"
  final val ENV_ONLINE = "ONLINE"
  final val TABLENAME = "tableName"
  final val PRIVSET = "privSet"

  /**
   * 元数据枚举常量
   */
  final val DATA_SEPARATOR = "|" //默认数据分隔符

  final val READ = "read" //物理地址元数据tblName枚举值
  final val READ_AND_WRITE = "readAndWrite" //物理地址元数据tblName枚举值

  final val RELATIONAL = "RELATIONAL" //获取字段元数据tblType枚举值,二维表
  final val TOPIC = "TOPIC" //获取字段元数据tblType枚举值
  final val FILE = "FILE" //获取字段元数据tblType枚举值
  final val VIEW = "VIEW" //获取字段元数据tblType枚举值,视图

  final val RELATIVE_LOCATION = "FILE_LOCATION" //获取cos相对存放路径
  final val FIELD_LENGTH = "FIELD_LENGTH" //获取cos相对存放路径
  final val CSV_DELIMITER = "CSV_DELIMITER" //cos文件分隔符
  final val FILE_FORMAT = "FILE_FORMAT" //结构化和半结构化文件格式
  final val UNSTRUCTURED_FILE_TYPE = "FILE_TYPE" //非结构化文件格式
  final val TABLE_CHARSET = "CHARSET" //cos文件字符集

  //ks3元数据常量
  final val KS3_DATA_SEPARATOR = "," //ks3默认数据分隔符
  final val KS3_RELATIVE_LOCATION = "FILE_LOCATION" //获取ks3相对存放路径
  final val KS3_FIELD_LENGTH = "FIELD_LENGTH" //获取ks3定长是否开启
  final val KS3_CSV_DELIMITER = "CSV_DELIMITER" //ks3文件分隔符
  final val KS3_FILE_FORMAT = "FILE_FORMAT" //结构化和半结构化文件格式
  final val KS3_UNSTRUCTURED_FILE_TYPE = "FILE_TYPE" //非结构化文件格式
  final val KS3_CHARSET = "CHARSET" //ks3文件字符集

  //HDFS元数据常量
  final val HDFS_DATA_SEPARATOR = "," //HDFS默认数据分隔符
  final val HDFS_RELATIVE_LOCATION = "FILE_LOCATION" //获取hdfs相对存放路径
  final val HDFS_FOLDER_PATH = "HDFS_FOLDER_PATH" //获取hdfs绝对存放路径
  final val HDFS_FIELD_LENGTH = "FIELD_LENGTH" //获取hdfs相对存放路径
  final val HDFS_CSV_DELIMITER = "CSV_DELIMITER" //hdfs文件分隔符
  final val HDFS_FILE_FORMAT = "FILE_FORMAT" //结构化和半结构化文件格式
  final val HDFS_UNSTRUCTURED_FILE_TYPE = "FILE_TYPE" //非结构化文件格式
  final val HDFS_TABLE_CHARSET = "CHARSET" //hdfs文件字符集

  final val NULL = "NaN"
  final val NULLS = "null"
  final val APPEND = "append"
  final val OVERWRITE = "overwrite"

  final val DATA_SPLIT = "data_split"
  final val COMMIT_RECODS = "commit_recods"
  final val ON_OFF = "on_off"
  final val DATA_SPLIT_NUMS = "nums"
  final val DYNAMIC_PARTITION = "dynamic-partition"
  final val STATIC_PARTITION = "static-partition"
  final val COS_DM_META_IMPL_CLASS = "com.kingsoft.dc.khaos.extender.meta.impl.CosDmMetaImpl"


  //SchedulerConstants.META_ORIGIN
  final val META_DATAMANAGEMENT = "dataManagement"
  final val META_DBSERVER = "dbserver"
}
